<%@ page pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <%@ include file="/jsp/adm/inc/incHead.jsp"%>
    </head>
    
    <body style="background: #fff; width: 98%">

		<!-- form 시작  -->
		<form id="<c:out value="${gsMainForm}"/>" name="<c:out value="${gsMainForm}"/>" method="post">
			<div class="poptxt3">
				<!-- list -->
				<c:set var="_colspan" value="3" />
				<table class="boardlist" summary="테이블 리스트입니다.">
		            <caption>테이블 목록</caption>
		            <!-- 과정 cell width 지정 시작  -->
		            <colgroup>
		                <col class="tw10" />
		                <col class="tw10" />
		                <col />
		            </colgroup>
		            <!-- 목록 cell width 지정 시작  -->
		            <!-- 목록 헤더(타이틀) 영역 끝  -->
		            <thead>
		                <tr>
		                    <th class="sta">순번</th>
		                    <th>선택</th>
		                    <th class="end">테이블명(TNAME)</th>
		                </tr>
		            </thead>
		            <!-- 목록 헤더(타이틀) 영역 끝  -->
		            
		            <tbody id="dataRow">
		            <c:if test="${empty output}">
		                <tr>
		                    <td class="nodata" colspan="<c:out value="${_colspan}" />">조회 내용이 없습니다.</td>
		                </tr>
		            </c:if>
		            <!-- 목록 ResultSet 반복 영역 시작  -->
		            <c:forEach var="list" items="${output}" varStatus="status">
		                <tr class="mouseover" id="<c:out value="${list.tableName}"/>" name=""<c:out value="${list.tableName}"/>">
		                    <td><c:out value="${status.count}"/></td>
		                    <td class="btn" style="height: 25px;"><input type="checkbox" id="chk" name="chk" onclick="javascript: commUtil.changeStyle(this);" value="<c:out value="${list.tableName}"/>" /></td>
		                    <td class="left"><c:out value="${list.tableName}"/></td>
		                </tr>
		                <tr>
							<td class="inner" id="td_<c:out value="${status.count}" />" colspan="<c:out value="${_colspan}" />" style="width : 100%; display : none;">
							</td>
						</tr>
		               	<c:if test="${!status.last}">
		                <tr id="<c:out value="${list.tableName}"/>_line" name=""<c:out value="${list.tableName}"/>_line">
		                    <td class="btline" colspan='<c:out value="${_colspan}" />'></td>
		                </tr>
		                </c:if>
		                <c:if test="${status.last}">
		                <tr>
		                	<td class="end" colspan='<c:out value="${_colspan}" />' /></td>
		                </tr>
		                </c:if>
		            </c:forEach>
		            </tbody>
		            <!-- 목록 ResultSet 반복 영역 끝  -->
		       </table>     
				<!-- //list -->
			</div>

		</form>
	</body>
</html>
<script language="javascript">
    
    Event.observe(window, 'load', function(){
        
    }, false);
    
	var EtcExecutor = {
		doConfirm : function() {
			var selectTable = new Array();
			var elements = $("<c:out value="${gsMainForm}"/>").elements;
	   			
			for (var i = 0 ; i < elements.length ; i++) {
				if (elements[i].type == 'checkbox' &&  elements[i].id == "chk" && elements[i].checked) {
					selectTable.push(elements[i].value);
				}
			}
			return selectTable;
		}
	}
</script>
